<!DOCTYPE html>
<html lang="en" xmlns:sec="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Spring Security登录成功</title>
</head>
<body style="text-align: center; width: 800px; margin: auto;">
<h3>欢迎<span sec:authentication="principal.username"></span>登录</h3>
<h3>当前用户权限是：<span sec:authentication="authorities"></span></h3>

<h3 sec:authorize="hasRole('ROLE_管理员')">管理员角色</h3>
<h3 sec:authorize="hasRole('ROLE_访客')">访客角色</h3>
<h3 sec:authorize="hasAuthority('admin:write')">管理员写权限</h3>
<h3 sec:authorize="hasAuthority('admin:read')">管理员读权限</h3>
<h3 sec:authorize="hasAuthority('guest:write')">访客写权限</h3>
<h3 sec:authorize="hasAuthority('guest:read')">访客读权限</h3>

</body>
</html>